package com.lorizz.docrepo.repository;

import com.lorizz.docrepo.model.Document;
import com.lorizz.docrepo.model.Folder;
import com.lorizz.docrepo.model.Permission;

public interface DocumentRepository {

    Folder getFolder(String absPath);

    Document getDocument(String uuid);

    Folder createFolder(String name);

    void save();

    void refresh(boolean keepChanges);

    void disconnect();

    Folder[] getFolders();

    boolean canRead(String absPath);

    boolean canWrite(Folder folder);

    boolean canModifyPermissions(Folder folder);

    void assignPermissions(String absPath, String principal,
            Permission... permissions);

}
